/**
 * <p>Copyright (c) 2011 深圳市鹏途信息技术有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	东莞交通工程质量监督综合业务系统        </p>
 * <p>创建者   :	Administrator 
 * 
 * <p>描   述  :   PileSpot.java for com.pengtu.entity.detect    </p>
 * 
 * <p>最后修改 : $: 2011-8-17-上午10:42:45 v 1.0.0	 Administrator   $     </p>
 * 
*/

package com.pengtu.entity.detect;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

/**
 * 基桩监督抽检
 * PileSpot
 * 
 * 2011-8-17 上午10:42:45
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "S_Q_DETECT_PILESPOT")
public class PileSpot {
	
	private static final long serialVersionUID = 1L;
	
	private String id;
	private String projectId;//工程Id
	private String bridgeName; //桥梁名称
	private String method;//检测方法
	private String result;//主要缺陷与说明
	
	private Integer count;//抽查数		
	private Integer pass1;//I类桩数量(根)
	private Integer pass2;//2类桩数量(根)
	private Integer pass3;//3类桩数量(根)
	private Integer pass4;//4类桩数量(根)
	private Integer pass5;//5类桩数量(根)
	private Integer pass6;//6类桩数量(根)
	private Integer remark;//备注
	private Date createDate; // 创建时间
	private Date reportdate;
	private String groupBy;
	private SpotReport spotReport;
	//private String delFlag;
	public PileSpot(){
		
	}
	public PileSpot(Long count,	
			Long pass1,
			Long pass2,
			Long pass3,
			Long pass4,
			Long pass5,
			Long pass6,String groupBy){
		this.count = count== null ? null :count.intValue();
		this.pass1 = pass1== null ? null :pass1.intValue();
		this.pass2 = pass2== null ? null :pass2.intValue();
		this.pass3 = pass3== null ? null :pass3.intValue();
		this.pass4 = pass4== null ? null :pass4.intValue();
		this.pass5 = pass5== null ? null :pass5.intValue();
		this.pass6 = pass6== null ? null :pass6.intValue();
		this.groupBy = groupBy;
		
	}
	public PileSpot(Long count,	
			Long pass1,
			Long pass2,
			Long pass3,
			Long pass4,
			Long pass5,
			Long pass6){
		this.count = count== null ? null :count.intValue();
		this.pass1 = pass1== null ? null :pass1.intValue();
		this.pass2 = pass2== null ? null :pass2.intValue();
		this.pass3 = pass3== null ? null :pass3.intValue();
		this.pass4 = pass4== null ? null :pass4.intValue();
		this.pass5 = pass5== null ? null :pass5.intValue();
		this.pass6 = pass6== null ? null :pass6.intValue();
	}
	@OneToOne(cascade = CascadeType.PERSIST, fetch = FetchType.EAGER)
	@JoinColumn(name = "SID")
	public SpotReport getSpotReport() {
		return spotReport;
	}
	public void setSpotReport(SpotReport spotReport) {
		this.spotReport = spotReport;
	}
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(length = 48)
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	@Column(name = "PID")
	public String getProjectId() {
		return projectId;
	}
	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}
	
	@Column(name = "BRIDGENAME")
	public String getBridgeName() {
		return bridgeName;
	}
	public void setBridgeName(String bridgeName) {
		this.bridgeName = bridgeName;
	}
	
	@Column(name = "METHOD")
	public String getMethod() {
		return method;
	}
	public void setMethod(String method) {
		this.method = method;
	}
	
	@Column(name = "RESULT")
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}
	
	@Column(name = "COUNT")
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	
	@Column(name = "PASS1")
	public Integer getPass1() {
		return pass1;
	}
	public void setPass1(Integer pass1) {
		this.pass1 = pass1;
	}
	
	@Column(name = "PASS2")
	public Integer getPass2() {
		return pass2;
	}
	public void setPass2(Integer pass2) {
		this.pass2 = pass2;
	}
	
	@Column(name = "PASS3")
	public Integer getPass3() {
		return pass3;
	}
	public void setPass3(Integer pass3) {
		this.pass3 = pass3;
	}
	
	@Column(name = "PASS4")
	public Integer getPass4() {
		return pass4;
	}
	public void setPass4(Integer pass4) {
		this.pass4 = pass4;
	}
	
	@Column(name = "PASS5")
	public Integer getPass5() {
		return pass5;
	}
	
	public void setPass5(Integer pass5) {
		this.pass5 = pass5;
	}
	
	@Column(name = "PASS6")
	public Integer getPass6() {
		return pass6;
	}
	public void setPass6(Integer pass6) {
		this.pass6 = pass6;
	}
	
	@Column(name = "REMARK")
	public Integer getRemark() {
		return remark;
	}
	public void setRemark(Integer remark) {
		this.remark = remark;
	}
	
	@Column(nullable = false, updatable = false, name = "CREATEDATE")
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	@Temporal(TemporalType.DATE)
	@Column(name = "REPORTDATE")
	public Date getReportdate() {
		return reportdate;
	}
	public void setReportdate(Date reportdate) {
		this.reportdate = reportdate;
	}
	@Transient
	public String getGroupBy() {
		return this.groupBy;
	}
}
